home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / fsinstall / RCS / diskUtils.h,v < prev    next >
Text File  |  1990-01-31  |  2KB  |  83 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.1
  10. date     90.01.31.13.54.14;  author shirriff;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @File as of 1-31-90, before replaced by symbolic link.
  17. @
  18.  
  19.  
  20.  
  21. 1.1
  22. log
  23. @Initial revision
  24. @
  25. text
  26. @/*
  27.  * fsDisk.h --
  28.  *
  29.  *    Definitions for utilities that examine a filesystem through
  30.  *    a raw disk interface.
  31.  */
  32.  
  33. #ifndef _FSUSERDISK
  34. #define _FSUSERDISK
  35.  
  36. #include "kernel/fs.h"
  37. #include "kernel/dev.h"
  38. #include "kernel/fsdm.h"
  39. #include "kernel/devDiskLabel.h"
  40.  
  41. /*
  42.  * These should be here.  They should be in some machine dependent header
  43.  * file.  But for now ...
  44.  */
  45. #define BITS_PER_BYTE           8
  46. #define BITS_PER_INT            32
  47.  
  48. /*
  49.  * DISK_SECTORS_PER_BLOCK    Number of disk sectors per file system block.
  50.  * DISK_KBYTES_PER_BLOCK    Number of kbyte chunks per file system block.
  51.  */
  52. #define DISK_SECTORS_PER_BLOCK       (FS_BLOCK_SIZE / DEV_BYTES_PER_SECTOR)
  53. #define DISK_KBYTES_PER_BLOCK        (FS_BLOCK_SIZE / 1024)
  54.  
  55. typedef struct Disk_Info {
  56.     int firstCylinder;
  57.     int numCylinders;
  58.     int numHeads;
  59.     int numSectors;
  60.     int domainSector;
  61.     int numDomainSectors;
  62.     int bootSector;
  63.     int numBootSectors;
  64.     int summarySector;
  65.     char asciiLabel[128];
  66. } Disk_Info;
  67.  
  68. /*
  69.  * Forward Declarations.
  70.  */
  71. Disk_Info        *Disk_ReadDiskInfo();
  72. Sun_DiskLabel        *Disk_ReadSunLabel();
  73. Fsdm_DiskHeader        *Disk_ReadDiskHeader();
  74. void            Disk_PrintDomainHeader();
  75. int            Disk_BlockWrite();
  76. int            Disk_SectorWrite();
  77. int            Disk_BlockRead();
  78. int            Disk_SectorRead();
  79. int            Disk_BadBlockRead();
  80.  
  81. #endif FILESYSTEM
  82. @
  83.